<?php
/**
 * The template for displaying the footer.
 * @author Mr Rony<mrtrandangtrinh@gmail.com>
 */

if( !defined('HTML_MODE') )
	define('HTML_MODE', (!empty($_GET['htmlmode']) ? '.min' : '') );

global $sTemplateURL;
$sTemplateURL = get_template_directory_uri();

$options = get_option( 'mobileshop_theme_options' );

?>
			</section><!-- begin of section.container -->

		</div><!-- end of div#main -->

		<!-- begin footer -->
		<footer>
			<section class="container">
				<p class="pull-left"><?php echo $options['copyright']; ?></p>
				<p class="pull-right">Thiết kế bởi <a href="http://agilsun.com/" target="_blank">Agilsun</a>.</p>
			</section><!-- end section.container -->
		</footer><!-- end footer -->

	</div><!-- end #container -->

	<?php wp_footer(); ?>
	
	<script>window.jQuery || document.write('<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery<?php echo HTML_MODE; ?>.js"><\/script>')</script>
	<script>window.jQuery || document.write('<script src="<?php echo $sTemplateURL; ?>/js/vendor/jquery-1.10.1<?php echo HTML_MODE; ?>.js"><\/script>')</script>

	<div id="fb-root"></div>
	<script>(function(d, s, id) {
		var js, fjs = d.getElementsByTagName(s)[0];
		if (d.getElementById(id)) return;
		js = d.createElement(s); js.id = id;
		js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
		fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));</script>
	<!-- AddThis Button BEGIN -->
	<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-507e234541de584e"></script>
	<!-- AddThis Button END -->
	<script src="<?php echo $sTemplateURL; ?>/js/vendor/bootstrap<?php echo HTML_MODE; ?>.js"></script>
	<script type="text/javascript" src="<?php echo $sTemplateURL; ?>/js/libs/jquery.cycle.all.js"></script>
	
	<script type="text/javascript" src="<?php echo $sTemplateURL; ?>/js/script.js?v=1"></script>

	<script>
		var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
		(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
		g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
		s.parentNode.insertBefore(g,s)}(document,'script'));
	</script>
	
    <?php echo $options['footerscript']; ?>
    
</body>
</html>